import arcade
#窗口的宽，长度
arcade.open_window(600, 600, "Drawing Example")


#设置背景颜色
arcade.set_background_color(arcade.csscolor.SKY_BLUE)

#开始画图
arcade.start_render()

#我们绘制的绿色矩形，左边位置为0，右边位置为599， 顶部位置为300， 底部位置为0
arcade.draw_lrtb_rectangle_filled(0, 600, 350, 200, arcade.csscolor.GREEN)

# 绘制树桩
arcade.draw_rectangle_filled(100, 320, 20, 100, arcade.csscolor.SIENNA)

# 绘制树冠
arcade.draw_circle_filled(100, 380, 30, arcade.csscolor.DARK_RED)
# 再绘制一棵树
arcade.draw_rectangle_filled(200, 330, 20, 100, arcade.csscolor.SIENNA)
arcade.draw_ellipse_filled(200, 370, 60, 80, arcade.csscolor.DARK_GREEN)
# 绘制一颗弧形树
arcade.draw_rectangle_filled(300, 330, 20, 100, arcade.csscolor.SIENNA)
arcade.draw_arc_filled(300, 340, 60, 100, arcade.csscolor.DARK_GREEN, 0, 180)
# 绘制一颗三角形树
arcade.draw_rectangle_filled(400, 330, 20, 100, arcade.csscolor.SIENNA)
arcade.draw_triangle_filled(400, 400, 370, 320, 430, 320, arcade.csscolor.DARK_GREEN)

# 绘制多边形树
arcade.draw_rectangle_filled(500, 330, 20, 100, arcade.csscolor.SIENNA)
arcade.draw_polygon_filled(((500, 400),
                            (480, 360),
                            (470, 320),
                            (530, 320),
                            (520, 360)
                            ),
                           arcade.csscolor.DARK_GREEN)



# 画个太阳
arcade.draw_circle_filled(500, 550, 50, arcade.color.PINK)

# 左右上下的光线
arcade.draw_line(500, 500, 500, 500, arcade.color.YELLOW, 6)
arcade.draw_line(400, 550, 590, 550, arcade.color.YELLOW, 6)
arcade.draw_line(500, 550, 500, 450, arcade.color.YELLOW, 6)
arcade.draw_line(500, 550, 500, 650, arcade.color.YELLOW, 6)

# 对角光线
arcade.draw_line(500, 550, 550, 600, arcade.color.RED, 5)
arcade.draw_line(500, 550, 550, 500, arcade.color.GREEN, 5)
arcade.draw_line(500, 550, 450, 600, arcade.color.BLUE, 5)
arcade.draw_line(500, 550, 450, 500, arcade.color.BLACK, 5)









#结束画图
arcade.finish_render()

#保持窗口
arcade.run()

